<template>
  <el-pagination
          class="pagination"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currPage"
          :page-sizes="[10, 30, 50, 100]"
          :page-size="pagesize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total">
  </el-pagination>
</template>

<script>

//    props: {
//        isEdit: {
//            type: Boolean,
//        default: false
//        }
  export default {
      name:'pageination',
      props:{
          total:Number,
          currPage:{type:Number,default:1},
          pagesize:{type:Number,default:10},
      },
      methods: {
          handleSizeChange(val) {
              this.$emit("changePage",{'pagesize':val,'currPage':1});
          },
          handleCurrentChange(val) {
              this.$emit("changePage",{'pagesize':this.pagesize,'currPage':val});
          }
      },
  }
</script>
<style>
  .pagination{
    float: right;
    margin-top: 20px;
  }
</style>
